#include "widget.h"
#include "ui_widget.h"
#include <QDebug>
#include <QPushButton>
#include <QIcon>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    this->setWindowTitle("cf");

    QIcon icon;
    icon.addFile(":/1.jpg");
    this->setWindowIcon(icon);


    QPushButton *button = new QPushButton(this);
    button->setText("按钮");
//    QRect rect1 = this->geometry();
//    QRect rect2 = this->frameGeometry();

//    qDebug() << rect1;
//    qDebug() << rect2;

//    QPushButton *button = new QPushButton(this);
//    button->move(100,100);
//    connect(button,&QPushButton::clicked,this,&Widget::handle);
}

//void Widget::handle()
//{
//        QRect rect1 = this->geometry();
//        QRect rect2 = this->frameGeometry();

//        qDebug() << rect1;
//        qDebug() << rect2;
//}

Widget::~Widget()
{
    delete ui;
}

